import { useHttp } from '@src/utils/http';
import { User } from '@src/types/user';
import { useQuery } from 'react-query';

export const useUsers = (param?: Partial<User>) => {
  //
  const client = useHttp();
  return useQuery<User[]>(['users', param], () => client('users', { data: param }));
};
